


import request from '@/axios';
import { baseUrl } from '@/config/env';

// 商品分类-修改分类
export const classificationUpdate = (data) => request({
    url: baseUrl + '/commodity/classification/update',
    method: 'post',
    data
})
// 商品分类-添加分类
export const classificationAdd = (data) => request({
    url: baseUrl + '/commodity/classification/add',
    method: 'post',
    data
})
// 商品分类-分类列表
export const classificationList = (data) => request({
    url: baseUrl + '/commodity/classification/list',
    method: 'post',
    data
})
// 商品分类-删除分类
export const classificationDelete = (id) => request({
    url: baseUrl + `/commodity/classification/delete/${id}`,
    method: 'get'
});



// 商品服务-修改服务
export const goodsAndServicesUpdate = (data) => request({
    url: baseUrl + '/commodity/goodsAndServices/update',
    method: 'post',
    data
})
// 商品服务-添加服务
export const goodsAndServicesAdd = (data) => request({
    url: baseUrl + '/commodity/goodsAndServices/add',
    method: 'post',
    data
})
// 商品服务-商品列表
export const goodsAndServicesList = (data) => request({
    url: baseUrl + '/commodity/goodsAndServices/list',
    method: 'post',
    data
})
// 商品服务-删除服务
export const goodsAndServicesDelete = (id) => request({
    url: baseUrl + `/commodity/goodsAndServices/delete/${id}`,
    method: 'get'
});



// 商品参数-修改参数
export const commodityParametersUpdate = (data) => request({
    url: baseUrl + '/commodity/commodityParameters/update',
    method: 'post',
    data
})
// 商品参数-添加参数
export const commodityParametersAdd = (data) => request({
    url: baseUrl + '/commodity/commodityParameters/add',
    method: 'post',
    data
})
// 商品参数-参数列表
export const commodityParametersList = (data) => request({
    url: baseUrl + '/commodity/commodityParameters/list',
    method: 'post',
    data
})
// 商品参数-删除列表
export const commodityParametersDelete = (id) => request({
    url: baseUrl + `/commodity/commodityParameters/delete/${id}`,
    method: 'get'
});

// 商品列表-添加商品
export const productListAdd = (data) => request({
    url: baseUrl + '/commodity/productList/add',
    method: 'post',
    data
})
//商品列表-添加商品-获取门店数据
export const getShopNameList = (id) => request({
    url: baseUrl + `/commodity/productList/shopName/${id}`,
    method: 'get'
})
// 商品列表-列表查询
export const getProductList = (data) => request({
    url: baseUrl + '/commodity/productList/list',
    method: 'post',
    data
})
//商品列表-删除商品
export const productListDelete = (id) => request({
    url: baseUrl + `/commodity/productList/delete/${id}`,
    method: 'get'
})
//商品列表-添加商品-获取景区列表
export const scenicAreaList = () => request({
    url: baseUrl + `/commodity/productList/add/scenicAreaList`,
    method: 'get'
})
// 商品列表-修改商品
export const productListUpdate = (data) => request({
    url: baseUrl + '/commodity/productList/update',
    method: 'post',
    data
})

// 商品审核-审核
export const checkOperation = (data) => request({
    url: baseUrl + '/commodity/productList/checkOperation',
    method: 'post',
    data
})
// 商品审核-审核列表
export const checkList = (data) => request({
    url: baseUrl + '/commodity/productList/checkList',
    method: 'post',
    data
})



// 商品-其他信息-商品推荐
export const commodityRecommendationAdd = (data) => request({
    url: baseUrl + '/commodity/commodityRecommendation/add',
    method: 'post',
    data
})
// 商品-其他信息-修改推荐商品
export const commodityRecommendationUpdate = (data) => request({
    url: baseUrl + '/commodity/commodityRecommendation/update',
    method: 'post',
    data
})
//商品-其他信息-删除商品推荐
export const commodityRecommendationDelete = (id) => request({
    url: baseUrl + `/commodity/commodityRecommendation/delete/${id}`,
    method: 'get'
})
//商品-其他信息-商品推荐-获取商品
export const getchooseProducts = () => request({
    url: baseUrl + `/commodity/commodityRecommendation/chooseProducts`,
    method: 'get'
})
//商品-其他信息-推荐商品列表
export const commodityRecommendationList = (data) => request({
    url: baseUrl + `/commodity/commodityRecommendation/list`,
    method: 'post',
    data
})